<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    body{
      margin: 0;
    }
    div{
      box-sizing: border-box;
    }
    .activity-dialog{
      position: relative;
      width: 100%;
      border-radius: 10px;
      background: linear-gradient(180deg, #FFD6DD 0%, #FFF3F5 72%, #FFFFFF 100%);
      border: 1px solid #E1E1E1;
    }
    .activity-header{
      padding: 12px 0 0 16px;
      height: 52px;
      width: 100%;
      box-sizing: border-box;
    }
    .logo{
      display: flex;
      align-items: center;
    }
    .xzdesktop {
      margin-right: 6px;
      width: 16px;
      height: 16px;
    }
    .xzdesk{
      font-size: 12px;
      font-weight: 400;
      color: #333;
    }
    .close{
      position: absolute;
      right: 14px;
      top: 12px;
      width: 16px;
      height: 16px;
      cursor: pointer;
    }
    .activity-body{
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 21px;
    }
    .activity-body img{
      margin-bottom: 6px;
      width: 100%;
      height: 120px;
    }
    .img-detail{
      font-size: 16px;
      font-family: Microsoft YaHei-Bold, Microsoft YaHei;
      font-weight: bold;
      color: #333;
    }
    .layout{
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      width: 120px;
    }
    .join{
      width: 190px;
      height: 42px;
      line-height: 42px;
      font-size: 16px;
      font-family: Microsoft YaHei-Bold, Microsoft YaHei;
      font-weight: bold;
      color: #FFF;
      text-align: center;
      background: linear-gradient(214deg, #FF007A 0%, #FF4E4E 100%);
      border-radius:25px;
      cursor: pointer;
    }
    .join:hover{
      background: linear-gradient(214deg, #EC2886 0%, #EC3737 100%);
    }
    .center{
      margin: 24px 0 25px;
      display: flex;
      justify-content: center;
    }
    .gold{
      position: absolute;
      top:0;
      right:40px;
      width: 50px;
      height: 35px;
    }
  </style>
</head>
<body>
  <div class="activity-dialog">
    <div class="activity-header">
      <div class="logo">
        <img src="./static/right-info/xzdesktop.svg" class="xzdesktop" alt="小智桌面">
        <div class="xzdesk">小智桌面</div>
      </div>
      <img src="./static/right-info/close.svg" alt="" class="close" onclick="closePage()">
      <img src="./static/right-info/gold.svg" alt="" class="gold">
    </div>
    <div class="activity-body">
      <div class="layout">
        <img src="./static/right-info/surprice@2x.png" alt="">
        <div class="img-detail">惊喜全家桶</div>
      </div>
      <div class="layout">
        <img src="./static/right-info/discount@2x.png" alt="" class="left">
        <div class="img-detail">历史抄底价</div>
      </div>
      <div class="layout">
        <img src="./static/right-info/fish@2x.png" alt="" class="left">
        <div class="img-detail">兑换码锦鲤</div>
      </div>
    </div>
    <div class="center">
      <div class="join" onclick="renew()">立即参与</div>
    </div>
  </div>
  <script src="./static/js/base.js"></script>
  <script src="./static/js/paper-base.js"></script>
  <script>
    const completeUrl = location.pathname
    function closePage(){
      invokeAPi('xz_close', {Url:completeUrl})
    }
    function renew(){
      const href = location.href
      const type = getQueryValue(href,'type')
      switchPreview(type, href)
      reportInfo(2753, {
        scene: 249,
        frequency: 1,
        param10: type
      })
      closePage()
    }
    invokeAPi('xz_HtmlPaintComplete', {CompleteUrl: completeUrl})
    function switchPreview (page, href) {
      switch (page) {
        case 'bzsy':
          invokeAPi('xz_switch_wallpaper_library')
          break
        case 'bzrwlmh':
          invokeAPi('xz_switch_DesktopBeautify')
          break
        case 'bzgrzx':
          invokeAPi('xz_ShowUserCenter', 8301, ` /PaperID 0`)
          break
        case 'bzlqzx':
          invokeAPi('xz_ShowUserCenter', 8301, ` /PaperID 0 /Tab 4`)
          break
        case 'wdbz':
          invokeAPi('xz_switch_my_wallpaper')
          break
        case 'bzszzx':
          invokeAPi('xz_setting')
          break
        case 'outsize':
          invokeAPi('js_open_url', getQueryValue(href,'url'))
          break
        default:
          return false
      }
    }
  </script>
</body>
</html>
